syms er_0 
syms er_1 
syms er_2 
syms er_3
syms er_4 
syms er_5
syms er_6
syms er_7
syms er_8
syms er_396
syms er_1103 
syms er_26390
syms er_sqrt8_9801
syms er_prod_1
syms er_pot_2
syms er_pot_3
syms er_prod_4
syms er_prod_5
syms er_suma_6
syms er_prod_7
syms er_div_8
syms er_prod_9
syms er_pot_10
syms er_pot_11
syms er_prod_12
syms er_prod_13
syms er_suma_14 
syms er_prod_15
syms er_prod_16
syms er_prod_17
syms er_prod_18
syms er_div_19
syms er_prod_20
syms er_suma_21
syms er_prod_22
syms er_pot_23
syms er_prod_24
syms er_prod_25
syms er_prod_26
syms er_prod_27
syms er_prod_28
syms er_prod_29
syms er_prod_30
syms er_prod_31
syms er_prod_32
syms er_prod_33
syms er_prod_34
syms er_div_35
syms er_suma_36
syms er_suma_37
syms er_prod_38
syms er_div_39
F1 = 4 * er_0 + er_prod_1;
F2 = log(396) * F1 + er_pot_2;
F3 = 4 * er_1 + er_pot_3;
F4 = F3 + F2 + er_prod_4;
F5 = 26390 * er_0 + er_prod_5;
F6 = er_1103 + F5 + er_suma_6;
F7 = 1103 * er_1 + F6 + er_prod_7;
F8 = F7 - 1/1103 * F4 + er_div_8;
F9 = er_4 + 4 * er_1 + er_prod_9;
F10 = 4 * 396^3 * er_396 + log(396) * 396^4 * F9 + er_pot_10;
F11 = 4*er_1 + er_4 + er_pot_11;
F12 = 396^4 * F11 + F10 + er_prod_12;
F13 = er_26390 + 26390 * er_1 + er_prod_13;
F14 = er_1103 + F13 + er_suma_14;
F15 = er_2 + 2 * er_1 + er_prod_15;
F16 = 2 * er_3 + 3 * F15 + er_prod_16;
F17 = 6 * er_4 + 4 * F16 + er_prod_17;
F18 = (1103 + 26390) * F17 + factorial(4) * F14 + er_prod_18;
F19 = 1/(396^4) * F18 - 1/factorial(4) * (1103+26390) * F12 + er_div_19;
F20 = 2 * er_4 + 4 * er_2 + er_prod_20;
F21 = er_396 + F20 + er_suma_21;
F22 = er_2 + 2 * er_1 + er_prod_22;
F23 = 4 * 2^3 * F22 + log(2) * 2^4 * er_4 + er_pot_23;
F24 = 396^8 * F23 + 2^4 * F21 + er_prod_24;
F25 = 2 * er_26390 + 26390 * er_2 + er_prod_25;
F26 = er_1103 + F25 + er_prod_26;
F27 = er_2 + 2 * er_1 + er_prod_27;
F28 = 2 * er_3 + 3 * F27 + er_prod_28;
F29 = factorial(3) * er_4 + 4 * F28 + er_prod_29;
F30 = factorial(4) * er_5 + 5 * F29 + er_prod_30;
F31 = factorial(5) * er_6 + 6 * F30 + er_prod_31;
F32 = factorial(6) * er_7 + 7 * F31 + er_prod_32;
F33 = factorial(7) * er_8 + 8 * F32 + er_prod_33;
F34 = (1103 + 26390 * 2) * F26 + factorial(8) * er_prod_34;
F35 = 1/(2^4 * 396^8) * F34 - 1/(factorial(8) * (1103 + 26390*2)) * F24 + er_div_35;
F36 = F19 + F8 + er_suma_36;
F37 = F35 + F36 + er_suma_37;
%----------------------------
R2 = 0;
i = 0;
      while (i < 3)
                 
             aux = factorial(4*i);
             aux2 = factorial(i); 
             num = aux * (1103+ (26390*i));
             dem = (aux2^4)*(396^(4*i));
             coc = num/dem;
             R2 = R2 + coc; 
             i = i +1; 
      end       
%------------------------------
F38 = R2 * er_sqrt8_9801 + (sqrt(8)/9801) * F37 + er_prod_38;
F39 = (sqrt(8)/9801 * R2)^(-1) * er_1 - F38 + er_div_39; 
expand(F39)
pretty